﻿#ifndef REGISTERUI_H
#define REGISTERUI_H

#include <QWidget>
#include <QGraphicsDropShadowEffect>
#include <QMouseEvent>

namespace Ui {
class RegisterUI;
}

class RegisterUI : public QWidget
{
    Q_OBJECT
private:
    void setShadow();
public:
    explicit RegisterUI(QWidget *parent = nullptr);
    ~RegisterUI();
    static RegisterUI* getInstance();
protected:
    void mousePressEvent(QMouseEvent *event);//鼠标点击
    void mouseMoveEvent(QMouseEvent *event);//鼠标移动
    void mouseReleaseEvent(QMouseEvent *event);//鼠标释放
//    void paintEvent(QPaintEvent *event);
private slots:
    void on_btn_close_clicked();

    void on_btn_min_clicked();

    void on_btn_register_clicked();

private:
    static RegisterUI* m_pRegister;
    Ui::RegisterUI *ui;
    bool isPressedWidget;//isPressedWidget和last用来控制窗口移动
    QPoint last;
};

#endif // REGISTERUI_H
